<template>
  <div class="template-page">
    <div class="head">
      <div class="head_fixed">
        <div class="head_content"></div>
      </div>
    </div>
    <div class="page-main">
      <ul class="resume_list">
        <li v-for="(item, index) in templateList" :key="index">
          <div class="resume_list_img"
            :style="{ backgroundImage: `url(${urlTranslate(item.imgUrl)})` }">
            <div class="list_tip">
              <div class="make">立即免费制作</div>
            </div>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>
<script setup>
import { computed } from 'vue';
  import { RESUMEN_TEMPLATE_LIST } from '@/utils/config';

  const templateList = computed(() => RESUMEN_TEMPLATE_LIST);

  const urlTranslate = (url) => {
    return require(`@/assets/images/template/${url}`);
  };

</script>
<style lang="scss" scoped>
  .template-page {
    width: 100%;
    background: #f0f3ef;
    min-height: 100vh;
    .resume_list {
      width: 1200px;
      margin: auto;
      // display: flex;
      li {
        width: 318px;
        display: inline-block;
        margin: 15px 41px;
        border-radius: 4px;
        overflow: hidden;
        background-color: #fff;
        border: 1px solid #fff;
        box-sizing: border-box;
        cursor: pointer;
        &:hover {
          box-shadow: 0 2px 15px rgba(0, 0, 0, .3);
          border-color: #1467cc;
          .list_tip {
            opacity: 1;
          }
        }
        .resume_list_img {
          width: 100%;
          height: 440px;
          background-position: center 0;
          background-repeat: no-repeat;
          background-size: 100% auto;
          position: relative;
          overflow: hidden;
          -webkit-transition: all .2s ease-out 0s;
        }
        .list_tip {
          width: 100%;
          height: 100%;
          background-color: rgba(0, 0, 0, .5);
          text-align: center;
          color: #fff;
          padding-top: 150px;
          -webkit-transition: all .1s linear 0s;
          transition: all .1s linear 0s;
          opacity: 0;
          .make {
            font-size: 14px;
            margin-top: 10px;
            width: 60%;
            height: 36px;
            line-height: 36px;
            text-align: center;
            color: #fff;
            background-color: #1467cc;
            border-radius: 8px;
            margin: 20px auto 0;
          }
        }
      }
    }
  }
  .head {
    width: 100%;
    position: relative;
    height: 66px;
    .head_fixed {
      position: fixed;
      top: 0;
      width: 100%;
      z-index: 9;
      background-color: #fff;
      -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .6);
      box-shadow: 0 0 10px rgba(0, 0, 0, .6);
      -webkit-transition: all .2s ease-out 0s;
      .head_content {
        height: 66px;
        padding: 0;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
      }
    }
  }
</style>
